
<!DOCTYPE html>

<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <style type="text/css">
        *{
            margin: 0;
            padding: 0;
        }
        body{
            background-color: #4f86f6;
        }
        .flex{
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .popup-content{
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.95);
            position: fixed;
            top: 0;
            left: 0;

        }
        .popup-wrap{
            width: 90%;
            height: 180px;
            background-color: #fff;
            border-radius: 20px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
            margin-top: -234px;
        }
        .popup-text{
            font-size: 18px;
            color: #ff3e3e;
            margin-top: 18px;
            width: 87%;
        }
        .popup-btn{
            width: 134px;
            height: 35px;
            font-size: 15px;
            color: #fff;
            background-color: #3463ff;
            border-radius: 24px;
            margin-bottom: 12px;
        }
        .warning-content{
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
        .warning-wrap{
            width: 95%;
            height: 12vw;
            background-color: #E5e29a;
            margin: 1vw 0;
        }
        .warning-text{
            color: #ff3e3e;
            font-size: 6vw;
            font-weight: bold;
        }
        .text-none{
            margin: 0 1vw;
        }
        .content-content{
            width: 92%;
            background-color: #fff;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 650px;
        }
        .content-wrap{
            width: 94%;
            height: 92vw;
            background-color: #ddf2ff;
            margin: 2vw 0;
            border-radius: 4.9vw;
            border: 0.4vw solid #4e77ff;
        }
        .text-content{
            display: flex;
            flex-direction: row;
            font-size: 4vw;
            margin: 6vw 0;
            margin-left: 6vw;
        }
        .name-content{
            display: flex;
            flex-direction: row;
            font-size: 4vw;
            margin-top: 6vw;
            margin-left: 6vw;
        }
        .name-btn-content{
            width: 100%;
            height: 8vw;
            margin-top: 2vw;
            margin-bottom: 4vw;
        }
        .name-btn{
            width: 94%;
            height: 8vw;
            background-color: #4f86f9;
            font-size: 4vw;
            color: #fff;
            border-radius: 4.9vw;
            border: 0.4vw solid rgba(52,99,255,1);
        }
        .money-text{
            color: #ff3e3e;
            font-weight: bold;
        }
        .order-num{
            width: 100%;
            font-size: 4vw;
            margin-top: 5vw;
        }
        .toast-text{
            font-size: 4vw;
            border: 0.6vw solid #f00;
            background: #f00;
            color: #fff;
            padding: 1vw;
            margin-top: 6vw;
            margin-bottom: 3vw;
        }
        .line-content{
            width: 92%;
            font-size: 4vw;
            background: #f00;
            color: #fff;
            line-height: 1.5;
            padding-bottom: 10vw;
            height: 90px;
        }
        #disappare{border-radius: 5px;font-size: 30px;
            width: 300px;position: fixed;top:50%;left: 37%;text-align: center;background-color: #ddd5d5;}
    </style>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0">
</head>
<body>
<div class="popup-content flex">
    <div class="popup-wrap">
        <div class="popup-text">&ensp;&ensp;请真实填写您的银行姓名，并一定要按指定金额付款，否则无法到账！</div>
        <input placeholder="您的银行卡姓名："/ style="width: 80%; height: 35px;font-size: 15px;" id="transferor">
        <div class="popup-btn flex" id="idname">确定</div>
    </div>
</div>
<div class="warning-content">
    <div class="warning-wrap flex">
        <div class="warning-text">请在<span class="text-none" id="timer"></span>秒内完成支付</div>
    </div>
    <div class="content-content">
        <div class="content-wrap">
            <div class="text-content">
                <div>银行：</div>
                <div style="font-size: 17px; margin-top: -2px;">${bankName}</div>
            </div>
            <div class="name-content">
                <div>姓名：</div>
                <div id="copy_x" style="font-size: 17px; margin-top: -2px;">${channelAccount}</div>
            </div>
            <div class="name-btn-content flex">
                <button id="copy" class="name-btn flex" type="button" onclick="copyT()">点击复制姓名</button>
            </div>
            <div class="name-content">
                <div>卡号：</div>
                <div id="copy_k" style="font-size: 23px;margin-top:-6px">${cardNo}</div>
            </div>
            <div class="name-btn-content flex">
                <button id="copy_1" class="name-btn flex" type="button" onclick="copyT1()">点击复制卡号</button>
            </div>
            <div class="name-content">
                <div>指定金额：</div>
                <div class="money-text" id="copy_q" style="font-size: 26px;margin-top:-7px">${money/100}</div>
            </div>
            <div class="name-btn-content flex">
                <button id="copy_2" class="name-btn flex" type="button" onclick="copyT2()">点击复制金额</button>
            </div>
            <div class="order-num flex">订单号：${orderNo}</div>
        </div>
        <div class="toast-text flex">以下提示务必遵守，否则无法到账</div>
        <div class="line-content">
            <div>1、请真实填写您的银行卡姓名</div>
            <div>2、请按上方指定金额付款，请勿超时支付</div>
            <div>3、订单仅一次有效，请勿重复支付</div>
            <div>4、使用手机银行或云闪付转账，不支持微信支付宝转账</div>
        </div>
        <textarea id="textarea" style="position: fixed;top: -99999px;left: -99999px;"></textarea>
    </div>
</div>
<div id="disappare" style="display:none">
    <p>复制成功</p>
</div>
<script type="text/javascript" src="https://ajax.microsoft.com/ajax/jquery/jquery-1.4.min.js"></script>

<script type="text/javascript">

    $("#idname").click(function(){//绑定点击事件
        if($("#transferor").val()==""){
            alert("请输入付款人姓名！");
        }else{
            $.post("${ctxPath}/qqgmpay/api/v1/transferor/${orderNo}/"+$("#transferor").val(),function(data,status){
                if(data.code=="200"){
                    $(".popup-content").toggle();//进行显示 隐藏替换
                }
            });
        }
    });
    function copyT() {
        let textA = document.getElementById('textarea')
        let text = document.getElementById('copy_x')
        copyText(text.innerHTML);
        alert( "复制成功!");
        /*textA.select()
        $("#disappare").show().delay(1000).hide(100);
        document.execCommand('copy')*/
    }
    function copyT1() {
        let textA = document.getElementById('textarea')
        let text = document.getElementById('copy_k')
        copyText(text.innerHTML);
        alert( "复制成功!");
    }
    function copyT2() {
        let textA = document.getElementById('textarea')
        let text = document.getElementById('copy_q')

        copyText(text.innerHTML);
        alert( "复制成功!");
    }
    var maxtime = 5*60;
    function countDown() {
        if(maxtime >= 0) {
            minutes = Math.floor(maxtime / 60);
            seconds = Math.floor(maxtime % 60)
            let s = 0
            if(seconds<10) {
                s='0'+seconds
            } else {
                s = seconds
            }
            msg = '0'+minutes + " 分 " + s+ " ";
            document.all["timer"].innerHTML = msg
            --maxtime
        }else {
            clearInterval(timer)
        }
    }
    function copyText(text) {
        var textarea = document.createElement("textarea");
        var currentFocus = document.activeElement;
        document.body.appendChild(textarea);
        textarea.value = text;
        textarea.focus();
        if (textarea.setSelectionRange)
            textarea.setSelectionRange(0, textarea.value.length);
        else
            textarea.select();
        try {
            var flag = document.execCommand("copy");
        } catch(eo){
            var flag = false;
        }
        document.body.removeChild(textarea);
        currentFocus.focus();
        return flag;
    }
    timer = setInterval("countDown()",1000)
</script>
</body>
</html>
